<template>
	<div class="welcome_main">
		<p>&nbsp;</p>
		<br />
		<p>电脑名: {{hostname}} </p>
		<br />
		<p>Cpu: {{cpu}}</p>
		<br />
		<p>操作系统: {{os}} </p>
		<br />
		<p>处理器架构: {{goarch}} </p>
		<br />
		<p>总内存: {{neicun}} </p>
		<br />
		<p>可用内存: {{neyongneicun}} </p>
	</div>
</template>

<script>
	export default {
		name:"Welcome",
		data(){
			return {
				os:'',
				cpu:'',
				hostname:'',
				goarch:'',
				neicun:'',
				neyongneicun:'',
			}
		},
		methods:{
			getMenu(){
				var thisInfo = this
				// 发送POST请求
				this.$axios.post('/admin/v1/sysconf/index', {}, {headers:{'Content-Type':'"application/x-www-form-urlencoded;charset=UTF-8'}}).then(function (response) {
					thisInfo.os = response.data.data.Os
					thisInfo.hostname = response.data.data.HostName
					thisInfo.goarch = response.data.data.Goarch
					thisInfo.neicun = response.data.data.TotalMem
					thisInfo.neyongneicun = response.data.data.AvailableMem
					thisInfo.cpu = response.data.data.Cpu
				});
			}
		},
		created(){
			this.getMenu();
		},
		mounted: function(){
			
		}
	}
</script>

<style scoped>
	.welcome_main{
		float: left; margin-left: 1%;
	}
</style>